package com.wsc.controller;

import java.util.List;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.CrossOrigin;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import com.wsc.entity.User;
import com.wsc.service.UserService;

@RestController
@CrossOrigin(origins = "*", maxAge = 3600) // 前后端分离 实现跨域访问
@RequestMapping("user")
public class UserController {

	@Autowired
	private UserService us;

	@RequestMapping("getAll")
	public List<User> getAll() {
		return us.getAll();
	}
}
